﻿{extend name="$_tpl_public_layout_ace"/}


{block name="breadcrumb"}
<ul class="breadcrumb">
	<li><i class="fa fa-home home-icon"></i><a href="{:url('manage/index/index')}">{:config('web_site_title')}</a></li>
	<li><a href="{:url('seatsel/manage/index')}">{:config('proj_name')}</a></li>
	<li><a href="{:url('seatsel_manage/order/index')}">{$sideName}</a></li>
</ul>
{/block}


{block name="pageheader"}
<h1>
	{$sideName}
</h1>
{/block}


{block name="content"}
<link rel="stylesheet" href="/tplnew/public/com_order/you_style.css">
<link rel="stylesheet" href="/tplnew/public/com_order/order_index.css">
<link rel="stylesheet" href="/tplnew/public/com_order/order_detail.css">

<div class="page-trade-order-detail">

<!-- 内容区 -->
<?php
if ($orderInfo['trade_status'] == 1) {
	$status_1 = 'ui-step-done';
} else if ($orderInfo['trade_status'] == 2) {
	$status_1 = 'ui-step-done';
	$status_2 = 'ui-step-done';
} else if ($orderInfo['trade_status'] == 3) {
	$status_1 = 'ui-step-done';
	$status_2 = 'ui-step-done';
	$status_3 = 'ui-step-done';
} else if ($orderInfo['trade_status'] == 4) {
	$status_1 = 'ui-step-done';
	$status_2 = 'ui-step-done';
	$status_3 = 'ui-step-done';
	$status_4 = 'ui-step-done';
}
?>
<div class="step-region">
	<ul class="ui-step ui-step-4">
		<li class="{$status_1}">
			<div class="ui-step-title">买家下单</div>
			<div class="ui-step-number">1</div>
			<div class="ui-step-meta">{$orderInfo['create_time_show']}</div>
		</li>
		<li class="{$status_2}">
			<div class="ui-step-title">买家付款</div>
			<div class="ui-step-number">2</div>
			<div class="ui-step-meta">{$orderInfo['pay_time_show']}</div>
		</li>
		<li class="{$status_3}">
			<div class="ui-step-title">商家发货</div>
			<div class="ui-step-number">3</div>
			<div class="ui-step-meta">{$orderInfo['send_time_show']}</div>
		</li>
		<li class="{$status_4}">
			<div class="ui-step-title">交易完成</div>
			<div class="ui-step-number">4</div>
			<div class="ui-step-meta">{$orderInfo['receipt_time_show']}</div>
		</li>
	</ul>
</div>

<div class="content-region clearfix">
	<div class="info-region">
		<h3>订单信息<span class="secured-title hide">担保交易</span></h3>
		<table class="info-table">
			<tbody>
				<tr><th>订单编号：</th><td>{$orderInfo['order_no']}</td></tr>
				<tr style="display: table-row;display: none;"><th>订单类型：</th><td>普通订单&nbsp;&nbsp;</td>
				<tr style="display: table-row;"><th>订单状态：</th><td>{$orderInfo['trade_status_show']}&nbsp;&nbsp;</td></tr>
				<tr style="display: none;"><th>团编号：</th><td>-</td></tr>
				<tr style="display: none;"><th>归属网点：</th><td>-</td></tr>
				<tr style="display: none;"><th>网点信息：</th><td>-</td></tr>
				<tr><th>付款方式：</th><td>{$orderInfo['pay_method_show']}</td></tr>
				<tr><th>买家：</th><td><a href="javascript:;" class="new-window" target="_blank">{$orderInfo['username']}</a></td></tr>
				<tr><th>买家来源：</th><td>{$orderInfo['user_source']}</td></tr>
				{if condition="$orderInfo['trade_status'] == 5"}
				<tr><th>核销方式：</th><td>{$orderInfo['verfiy_method_show']}</td></tr>
				<tr><th>核销人员：</th><td>{$orderInfo['verfiy_name']}</td></tr>
				{/if}
			</tbody>
		</table>
		{if condition="$orderInfo['refund_status'] != 1"}
		<div class="dashed-line"></div>
		<table class="info-table">
			<tbody>
				<tr style="display: table-row;"><th>退款状态：</th><td>{$orderInfo['refund_status_show']}&nbsp;&nbsp;</td></tr>
				<tr style="display: table-row;"><th>退款金额：</th><td>{$orderInfo['refund_fee']}&nbsp;&nbsp;</td></tr>
				<tr style="display: table-row;"><th>退款原因：</th><td>{$orderInfo['refund_reason']}&nbsp;&nbsp;</td></tr>
				<tr style="display: table-row;"><th>退款时间：</th><td>{$orderInfo['refund_time_show']}&nbsp;&nbsp;</td></tr>
			</tbody>
		</table>
		{/if}
		<div class="dashed-line"></div>
		<table class="info-table">
			<tbody>
				<tr><th>配送方式：</th><td>{$orderInfo['delivery_mode_show']}</td></tr>
				{if condition="$orderInfo['delivery_mode'] == 1"}
					<tr><th>收货信息：</th><td>{$addressInfo['province']}{$addressInfo['city']}{$addressInfo['county']}{$addressInfo['address_detail']}, {$addressInfo['truename']}, {$addressInfo['mobile']}</td></tr>
				{/if}
				{if condition="$orderInfo['delivery_mode'] == 2"}
					<tr><th>自提点：</th><td>{$selfpickupInfo['name']}({$selfpickupInfo['address']} 电话：{$selfpickupInfo['tel']})</td></tr>
				{/if}
			</tbody>
		</table>
		<div class="dashed-line"></div>
		<table class="info-table">
			<tbody>
				{volist name="leavemess_fields" id="vo"}
				<tr><th>{$vo['name']}：</th><td>{$orderInfo[$vo['flag']]}</td></tr>
				{/volist}
			</tbody>
		</table>
		<div class="promotion-app hide">
			<a href="javascript:;"><i class="ico-mobile-app"></i><h4>微商城手机客户端</h4><p>用手机随时随地管理店铺</p></a>
			<div class="ui-popover right-center promotion-app-popover2 hide">
				<div class="ui-popover-inner">
					<h3>使用微信扫码，直接下载安装</h3>
				</div>
				<div class="arrow"></div>
			</div>
		</div>
	</div>
	<div class="state-region">
		<div style="padding: 0px 0px 30px 40px;">
			<h3 class="state-title"><span class="icon info">!</span>订单状态：{$orderInfo['trade_status_show']}</h3>
			<div class="state-desc"><div>买家如在 <em>7天内</em> 没有申请退款，交易将自动完成；</div></div>
			<div class="state-action mb10 hide">
				<a href="javascript:;" class="ui-btn ui-btn-sub ui-btn-link">备注</a>
				<div class="ui-star"><span title="去星" class="active"></span><span title="一星" class=""></span><span title="二星" class=""></span><span title="三星" class=""></span><span title="四星" class=""></span><span title="五星" class=""></span></div>
			</div>
			<div class="state-desc">
				<a href="{:url('seatsel_manage/order/doInvalid', ['orderId'=>$orderId])}" class="btn btn-success btn-xs J_layerConfirm" data-tip="确认失效该订单吗？">失效</a>
				<a href="{:url('seatsel_manage/order/doSeniorDelete', ['orderId'=>$orderId])}" class="btn btn-info btn-xs J_layerConfirm" data-tip="高级删除">高级删除</a>
				<a href="{:url('seatsel_manage/orderRefund/refundPop', ['channel'=>1, 'orderId'=>$orderId])}" class="btn btn-danger btn-xs J_layerDialog" data-tip="清确认退款金额及原因">主动退款</a>
			</div>
		</div>
		<div class="state-remind-region">
			<div class="dashed-line"></div>
			<div class="state-remind">
				<h4>昆山论坛提醒：</h4>
				<ul>
					<li>交易成功后，有赞将把货款结算至你的店铺账户余额，你可申请提现；</li>
					<li>请及时关注你发出的包裹状态，确保能配送至买家手中；</li>
					<li>如果买家表示未收到货或者货物有问题，请及时联系买家积极处理，友好协商；</li>
				</ul>
			</div>
		</div>
	</div>
</div>

<div class="order-comment"></div>

<table class="ui-table ui-table-simple goods-table order-detail-goods-table">
	<thead>
		<tr>
			<th></th>
			<th class="col-md-4">商品</th>
			<th>价格(元)</th>
			<th>数量</th>
			<th>优惠(元)</th>
			<th class="col-md-2">小计(元)</th>
			<th>状态</th>
		</tr>
	</thead>
	<tbody>
		<?php
			$orderProductNum = 0;
		?>
		{volist name="orderProductList" id="vo2"}
		<?php
			//$productTotalFee = $vo2['one_price'] * $vo2['buy_num'];
			
			//商品留言
			//$message_config = unserialize($productInfo['message_config']);
			//$messageCount = count($message_config);
			
			//订单商品数
			$orderProductNum += $vo2['buy_num'];
		?>
		<tr class="test-item">
			<td class="td-goods-image" rowspan="2">
				<div class="ui-centered-image" width="48px" height="48px" style="width: 48px; height: 48px;">
					<img src="{$productInfo['picurl']}" style="max-width: 48px; max-height: 48px;">
				</div>
			</td>
			<td>
				<a href="{:url('seatsel/product/detail', array('pid'=>$vo2['pid']))}" target="_blank">{$productInfo['name']}</a>
				<p class="c-gray">{$vo2['region_name']}{$vo2['pai']}排{$vo2['zuo']}座</p>
			</td>
			<td>{$vo2['real_price']}</td>
			<td>1</td>
			<td>-</td>
			<td>
				<p>{$vo2['real_price']}</p>
				<div><a href="{:url('seatsel_manage/orderRefund/refundPop', ['channel'=>1, 'orderId'=>$orderId, 'orderPid'=>$vo2['id']])}" class="goods-online-refund-link J_layerDialog" data-tip="清确认退款金额及原因">主动退款</a></div>
			</td>
			<td>
				<div>{$vo2['status_show']}</div>
				<if condition="$vo2['status'] eq 3">
					{$vo2['express_show']}
				</if>
			</td>
		</tr>
		{if condition="$messageCount gt 0"}
			<tr class="tr-goods-message">
				<td colspan="5">
					{volist name="message_config" id="vo3"}
						<p>{$vo3['name']}: {$vo2['messages'][$vo3['id']]}</p>
					{/volist}
				</td>
			</tr>
		{/if}
		<tr>
			<td colspan="7"></td>
		</tr>
		{/volist}
	</tbody>
	<tfoot>
		<tr>
			<td colspan="7" class="text-right">
				<span>订单共 {$orderProductNum} 件商品，总计：</span><span class="c-red">￥</span><span class="real-pay c-red">{$orderInfo['total_fee']}</span>
				<if condition="$orderInfo['delivery_fee']">
					<span>（含运费 ￥{$orderInfo['delivery_fee']}）</span>
				</if>
			</td>
		</tr>
	</tfoot>
</table>

<!-- 内容区 -->
</div>
{/block}
